package entjava.poker.service;

import java.util.ArrayList;
import java.util.List;

import entjava.poker.model.Player;

public class PlayerService {
	
	private ArrayList<Player> players;
	private List<String> names = new ArrayList<String>();

	public PlayerService(){	
		 this.players= new ArrayList<Player>();
	}
	
	public boolean checkInput(String userName){
			
		if(userName == null || userName.trim() == ""){
			return false;
		}
		return true;
	}
	
	public Player addUserName(String username, String id){
		Player play = new Player(username,  id);
		players.add(play);
		return play;
	 }
	 
	 public List<String> getPlayerList(String username){
		 names.add(username);
		 return names;				
	}
	 
	 
	public ArrayList<Player> getPlayers() {
			return players;
	}

	public void setPlayers(ArrayList<Player> players) {
			this.players = players;
	}
	
}